<?php
// +----------------------------------------------------------------------
// | Author: wyd 2025/11/4
// | DESC: 
// +----------------------------------------------------------------------

declare (strict_types=1);


namespace My\core\pool;

use Swoole\Runtime;

class PdoPool extends DbPool
{
    public function __construct(int $min = 5, int $max = 10,)
    {
        parent::__construct($min, $max);
    }


    public function db()
    {
        $dsn = 'mysql:host=192.168.105.201;dbname=test';
        //new里面已自带异常捕获；
        return new \PDO($dsn, 'wyd', '123456', [\PDO::ATTR_TIMEOUT => 5]);
    }
}